package com.nervenets.web.controller;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;

@Data
public class PagingParams implements Serializable {
    @ApiModelProperty(value = "页码", required = true)
    @PositiveOrZero(message = "页码无效，必须为大于等于0的正整数")
    private int page;
    @ApiModelProperty(value = "每页数量", required = true)
    @Positive(message = "每页数量必须为大于0的正整数")
    private int limit = 10;
}
